package com.atguigu.springcloud.server;

import com.atguigu.springcloud.domain.CommonResult;
import com.atguigu.springcloud.domain.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE") //调用的服务
public interface PaymentFeignService {

    @GetMapping("/payment/addPayment")
    public CommonResult<Payment> addPayment(Payment payment);

    @GetMapping("/payment/get/{id}")
    public CommonResult<Payment> findById(@PathVariable("id")int id);

    @GetMapping("/payment/findAll")
    public CommonResult findAll();
}
